package 比那名居的桃子;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int k = in.nextInt();
        long[] sum1 = new long[n + 1];
        long[] sum2 = new long[n + 1];
        for (int i = 1; i <= n; i++) {
            sum1[i] = in.nextLong();
            sum1[i] += sum1[i - 1];
        }
        for (int i = 1; i <= n; i++) {
            sum2[i] = in.nextLong();
            sum2[i] += sum2[i - 1];
        }
        long res1 = 0, res2 = Integer.MAX_VALUE, tmp = 0;
        for (int i = 1; i + k - 1 <= n; i++) {
            long s1 = sum1[i + k - 1] - sum1[i - 1];
            long s2 = sum2[i + k - 1] - sum2[i - 1];
            if (s1 > res1) {
                res1 = s1;
                tmp = i;
                res2 = s2;
            } else if (res1 == s1 && s2 < res2) {
                tmp = i;
                res2 = s2;
            }
        }
        System.out.println(tmp);
    }
}
